import 'package:flutter/material.dart';
import '../Gloabal.dart';
import 'Utils.dart';

class SearchWidget extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return TextField(
      onSubmitted: (query) {
        print(query);

        searchAssets(ParseGlobalFilePaths(),query);
      },
      decoration: InputDecoration(
        hintText: '搜索......',
        prefixIcon: Icon(Icons.search),
        contentPadding: EdgeInsets.symmetric(vertical: 10, horizontal: 16),
        border: OutlineInputBorder(
          borderRadius: BorderRadius.circular(24),
          borderSide: BorderSide(color: Colors.grey.shade300),
        ),
        filled: true,
        fillColor: Colors.grey.shade100,
      ),
    );
  }

}